package com.touni.designpattern.singletonpattern.lazy;

/**
 * @ClassName : ThreasEasySingleton
 * @Description :懒汉式  线程安全
 * @Author : lwq
 * @Date: 2020-10-19 15:21
 */
public class ThreadEasySingleton {

    private ThreadEasySingleton threadEasySingleton;

    private ThreadEasySingleton(){}

    public synchronized ThreadEasySingleton getInstance(){
        if (threadEasySingleton == null){
            threadEasySingleton = new ThreadEasySingleton();
        }
        return threadEasySingleton;

    }


}
